package Day06;

public class Demo05 {
    public static void main(String[] args) {
        Employee e = new Employee("张三",123123123,3000,0.15);
        Employee e1 = new Employee("李四",456456456,5000,0.11);
        Employee e2 = new Employee("王二",789789789,4500,0.12);
        Employee e3 = new Employee("麻子",147147147,6000,0.05);
        e.show();
        e1.show();
        e2.show();
        e3.show();
    }
}
class Employee{
    String name;//员工姓名
    long number;//员工号码
    int salary;//基本薪水
    double GR;//增长率
    Employee(){};//空参构造方法
    Employee(String name1, long number1, int salary1, double GR1){//全参构造
        name = name1;
        number = number1;
        salary = salary1;
        GR = GR1;
    }
    double sum(int x, double y){
        return x*y;//薪水增长额
    }
    double total(int x, double y){
        return x + y;
    }
    void show(){
        System.out.println("姓名\t员工号码\t    基本薪水\t增长率\t薪水增长额\t总金额\t");
        System.out.println(name + "\t" + number + "\t" + salary + "\t" + GR + "\t" + sum(salary,GR) + "\t" + "   " + total(salary,sum(salary,GR)) + "\t");
        System.out.println("================================");
    }
}
